Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

turf-invariant

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

turf-invariant

enforce expectations about inputs to turf

  • 3.0.12
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

turf-invariant

getCoord

Unwrap a coordinate from a Feature with a Point geometry, a Point geometry, or a single coordinate.

Parameters

  • obj Any any value

Returns Array<number> a coordinate

geojsonType

Enforce expectations about types of GeoJSON objects for Turf.

Parameters

  • value GeoJSON any GeoJSON object

  • type string expected GeoJSON type

  • name string name of calling function

  • Throws Error if value is not the expected type.

featureOf

Enforce expectations about types of Feature inputs for Turf. Internally this uses geojsonType to judge geometry types.

Parameters

  • feature Feature a feature with an expected geometry type

  • type string expected GeoJSON type

  • name string name of calling function

  • Throws Error error if value is not the expected type.

collectionOf

Enforce expectations about types of FeatureCollection inputs for Turf. Internally this uses geojsonType to judge geometry types.

Parameters

  • featurecollection FeatureCollection a featurecollection for which features will be judged

  • type string expected GeoJSON type

  • name string name of calling function

  • Throws Error if value is not the expected type.


This module is part of the Turfjs project, an open source module collection dedicated to geographic algorithms. It is maintained in the Turfjs/turf repository, where you can create PRs and issues.

Installation

Install this module individually:

$ npm install turf-invariant

Or install the Turf module that includes it as a function:

$ npm install turf

Keywords

FAQs

Package last updated on 05 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc